﻿using B.S.ReportEvent.Domain.Entities;
using Microsoft.EntityFrameworkCore;
using System.Collections.Generic;
using System.Reflection.Emit;

namespace B.S.ReportEvent.Infrastructure
{
    /// <summary>
    /// 基础数据上下文
    /// </summary>
    public class BaseDataDbContext : DbContext
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="options"></param>
        public BaseDataDbContext(DbContextOptions<BaseDataDbContext> options) : base(options)
        {
        }

        /// <summary>
        /// 应用实例
        /// </summary>
        public DbSet<WfInstances> WfInstances { get; set; } = null!;

        /// <summary>
        /// 工作流任务
        /// </summary>
        public DbSet<ProcessRecords> ProcessRecords { get; set; } = null!;

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
            // 可以在这里配置实体关系和约束
        }
    }
}
